package com.example.threadlocaldemo0.utils;

import java.sql.Connection;

public class ConnectionContainer {

    private static final ThreadLocal<Connection> threadLocal  = new ThreadLocal<>();

    public static void setConnection(Connection conn) {
        threadLocal.set(conn);
    }

    public static Connection getConnection() {
        return  threadLocal.get();
    }

}
